<!DOCTYPE html>
<html lang="en">

	<head>
		<!-- BEGIN META -->
		<?php $this->load->view('Public/headmeta.html');?>
		<!-- END META -->

		<!-- BEGIN STYLESHEET-->
		<?php $this->load->view('Public/headcss.html');?>
		<!-- END STYLESHEET-->
		<title>
			<?php echo $current['title']."-".$setting['title'];?>
		</title>

	</head>

	<body>
		<!-- BEGIN SECTION -->
		<section id="container">
			<!-- BEGIN HEADER -->
			<?php $this->load->view('Public/header.html');?>
			<!-- END HEADER -->
			<!-- BEGIN SIDEBAR -->
			<?php $this->load->view('Public/sidebar.html');?>
			<!-- END SIDEBAR -->
			<!-- BEGIN MAIN CONTENT -->
			<section id="main-content">
				<!-- BEGIN WRAPPER  -->
				<section class="wrapper">
					<!-- TOPMENU ROW  -->
					<?php $this->load->view('Public/topmenu.html');?>
					<!-- TOPMENU ROW -->

					<!-- ADMINIDTRAROR ROW  -->
					<div class="row">
						<div class="col-lg-12">
							<section class="panel">
								<header class="panel-heading">
									<span class="label label-primary">管理员列表</span>
									<span class="tools pull-right"></span>
								</header>
								<div class="panel-body">
									<!-- BEGIN DIV FORM -->
									<div class="form navbar navbar-default">
										<form class="form-horizontal" role="form" action="<?php echo site_url('Pkadmin/Administrator/index');?>" method="post">
											<div class="form-group m-bot0 m-top15">
												<label class="col-xs-1 control-label">关键字</label>
												<div class="col-xs-3">
													<div class="input-group m-bot15">
														<input type="text" class="form-control" name="keyword" placeholder="keyword">
														<span class="input-group-btn">
															<button type="submit" class="btn btn-white"><i class="fa fa-search"></i></button>
														</span>
													</div>
												</div>
											</div>
										</form>
									</div>
									<!-- END DIV FORM -->
									<table class="table table-striped table-advance table-hover">
										<thead>
											<tr>
												<th class="text-center"><i class="fa fa-list"></i> ID </th>
												<th class="text-center"><i class="fa fa-user"></i> 用户名 </th>
												<th class="text-center"><i class="fa fa-male"></i> 性别 </th>
												<th class="text-center"><i class="fa fa-calendar"></i> 出生年月 </th>
												<th class="text-center"><i class="fa fa-phone"></i> 电话 </th>
												<th class="text-center"><i class="fa fa-linux"></i> QQ </th>
												<th class="text-center"><i class="fa fa-maxcdn"></i> 邮箱 </th>
												<th class="text-center"><i class="fa fa-calendar-o"></i> 操作描述 </th>
											</tr>
										</thead>
										<tbody>
											<?php foreach($administrator_list as $item):?>
											<tr>
												<td class="text-center">
													<?php echo $item['admin_id'];?>
												</td>
												<td class="text-center">
													<?php echo $item['username'];?>
												</td>
												<td class="text-center">
													<?php if($item['sex'] == 0){echo "保密";}elseif($item['sex'] == 1){echo "男";}else{echo "女";}?>
												</td>
												<td class="text-center">
													<?php echo $item['birthday'];?>
												</td>
												<td class="text-center">
													<?php echo $item['phone'];?>
												</td>
												<td class="text-center">
													<?php echo $item['qq'];?>
												</td>
												<td class="text-center">
													<?php echo $item['email'];?>
												</td>
												<td class="text-center">
													<a href="<?php echo site_url('Pkadmin/Administrator/edit').'/'.$item['admin_id'];?>" class="btn btn-primary btn-xs" title="修改">
														<li class="fa fa-pencil"></li>
													</a>
													<?php if($item['admin_id'] != 1) echo '<a val='.site_url('Pkadmin/Administrator/del').'/'.$item['admin_id'].' class="btn btn-danger btn-xs del" title="删除"><li class="fa fa-trash-o"></li></a>';?>

													<!--<a val="<?php echo site_url('Pkadmin/Administrator/del').'/'.$item['admin_id'];?>" class="btn btn-danger btn-xs del" title="删除">
														<li class="fa fa-trash-o"></li>
													</a>-->
												</td>
											</tr>
											<?php endforeach;?>
										</tbody>
									</table>
									<!-- PAGEINFO ROW -->
									<div class="text-right m-r-15">
										<?php echo $pageinfo;?>
									</div>
									<!-- END PAGEINFO -->
								</div>
							</section>
						</div>
					</div>
					<!-- END ADMINIDTRAROR ROW  -->
				</section>
				<!-- END WRAPPER -->
			</section>
			<!-- END MAIN CONTENT -->
			<!-- BEGIN FOOTER -->
			<?php $this->load->view('Public/footer.html');?>
			<!-- END FOOTER -->
		</section>
		<!-- END SECTION -->
		<!-- BEGIN JS -->
		<?php $this->load->view('Public/footjs.html');?>
		<!-- INLINE JS RELATED TO THIS PAGE -->
		<script type="text/javascript">
			$(function() {
				$(".del").click(function() {
					var url = $(this).attr('val');
					layer.confirm('确定要删除此管理员用户吗？', {
						btn: ['确定', '取消'] //按钮
					}, function() {
						window.location.href = url;
					}, function() {});
				});
			});
		</script>
		<!-- END JS -->
	</body>

</html>